package com.diorsunion.hedge.dto;

import com.diorsunion.hedge.enums.BorkerType;
import com.google.common.collect.Maps;

import java.io.Serializable;
import java.util.Map;

/**
 * Created by custe on 2016/8/10.
 */
public class AccountSummary implements Serializable{
    private static final long serialVersionUID = 1L;
    public String accountCode;
    public BorkerType borkerType;
    public Map<String, String> tagValueMap = Maps.newConcurrentMap();

    public void put(String tag, String value) {
        if (tagValueMap == null) {
            tagValueMap = Maps.newConcurrentMap();
            tagValueMap.put(tag, value);
        }
        tagValueMap.put(tag, value);
    }

    public String getAccountCode() {
        return accountCode;
    }

    public void setAccountCode(String accountCode) {
        this.accountCode = accountCode;
    }

    public Map<String, String> getTagValueMap() {
        return tagValueMap;
    }

    public void setTagValueMap(Map<String, String> tagValueMap) {
        this.tagValueMap = tagValueMap;
    }

    @Override
    public String toString() {
        return "AccountSummary{" +
                "accountCode='" + accountCode + '\'' +
                ", tagValueMap=" + tagValueMap +
                '}';
    }
}
